import request from '@/utils/request'

// 查询老师排班列表
export function listRostering(query) {
  return request({
    url: '/teacher/rostering/rosteringList',
    method: 'get',
    params: query
  })
}

// 查询教师姓名
export function getTeacherNameList() {
  return request({
    url: '/teacher/rostering/teacherNameList',
    method: 'get'
  })
}

// 查询老师排班详细
export function getRostering(id) {
  return request({
    url: '/teacher/rostering/' + id,
    method: 'get'
  })
}

// 新增老师排班
export function addRostering(data) {
  return request({
    url: '/teacher/rostering',
    method: 'post',
    data: data
  })
}

// 修改老师排班
export function updateRostering(data) {
  return request({
    url: '/teacher/rostering',
    method: 'put',
    data: data
  })
}

// 删除老师排班
export function delRostering(id) {
  return request({
    url: '/teacher/rostering/' + id,
    method: 'delete'
  })
}

export function getUserGroupInfo() {
  return request({
    url: '/teacher/rostering/userGroupInfo',
    method: 'get'
  })
}
export function teacherRostering(rosteringForm) {
  return request({
    url: '/teacher/rostering/rostering',
    method: 'post',
    data: rosteringForm
  })
}
export function rosteringList() {
  return request({
    url: '/teacher/rostering/rosteringList',
    method: 'get',
  })
}
